public class test {

    /*   public static void main(String[] args) {
           //类
           //什么是类？类相当于一个模型，而对象则是类的具体实现。
           //对于public修饰的类，一个文件中只能有一个，且文件名与此类名必须相同
           // 类的形式:
           //   class 类名 {
           //     成员变量;
           //     成员方法;
           //
           //       }
   */
    /*   //类的实例化：对象
       public void main(String[] args) {
   //new关键字用于创建一个新的对象，在堆区上开辟一块内存
   //类名  对象名 = new 类名（）;
           Dog dog1 = new Dog();
           Dog dog2 = new Dog();
           dog1.set("小黑", 2);
           dog2.set("小王", 1);
       }
   }
   */
 /*   public static void main(String[] args) {
        Dog dog1 = new Dog();
        dog1.shout();
        dog1.setData("小黑",12);
        System.out.println(dog1.age);
        System.out.println(dog1.name);

    }

}

class Dog {
    String name;
    int age;

    public static void shout() {
        System.out.println("汪汪..........");
    }

    public  void setData(Dog this,String name, int age) {
       this. age = age;
       this. name = name;

    }
}*/

 /*   public static void main(String[] args) {
        Dog dog1 = new Dog();
        dog1.func1();
    }

}
//  this关键字
class Dog {
    String name;
    int age;

    public  void shout() {
        System.out.println("汪汪..........");
    }
   public void func1(){
        this.shout();
   }



}*/
    //构造方法
/*
 public static void main(String[] args) {

  Cat cat1 =new Cat("小红",3);

 }

}
class Cat{
    String name;
    int age ;
    public Cat(){
        System.out.println("喵喵........\n");
    }
    public Cat(String name,int age){
        this();
        this.name = name;
        this.age = age;

    }



}

*/


}


class Animal{
   private String name;
    private   int age;
    private int  a;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    public Animal(String name, int age, int a) {
        //按住ctrl键，进行选择！
        this.name = name;
        this.age = age;
        this.a = a;
    }
}



